//
/***********************************************************
             File name:      main.c
             Author:         Bitat (陆叁柒)
             Email :         Bitat@qq.com
             Gitee :         https://gitee.com/bitat
             CSDN  :         https://blog.csdn.net/bitat 
             History:        2023/3/27
************************************************************/
    

#include <stdio.h>

int main()
{
    int a,b;
    scanf("%d%d",&a,&b);
    
    int i = 0;
    int count = 0;
    for(i = a; i <= b; i++)
    {
        printf("%5d",i);
        count++;
        if(count%5 == 0 || i == b)
        {
            printf("\n");
        }
    }
    int sum = 0;
    for(i = a; i <= b; i++)
    {
        sum += i;
    }
    printf("Sum = %d\n",sum);
    return 0;
}

